<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="com.wxtf.platform.plugins.user.*"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
	UserBean user = (UserBean)request.getSession().getAttribute("userBean");
	
	String _db = user.getDbType();
	Map<String,List<Map<String, String>>> dicMap = user.getDicMap();
	List<Map<String, String>> list = null;
	String temp = "";
	String tbe_employment_forms = "";//用工形式
	String tbe_nation = "";//民族
	String tbe_marital_status = "";//婚姻状态
	String tbe_status = "";//员工状态
	String tbe_ba_status = "";//生育能力状态
	String tbe_birth_control_measures = "";//节育措施
	String tbe_es_reason="";//重点理由
	
	String type = request.getParameter("type");
	String orgId = request.getParameter("orgid");
	
	list = dicMap.get("101");
	if(null != list && list.size() > 0){
		for(Map<String, String> map: list){
			if("31".equals(map.get("tmgd_id"))){
				continue;
			}
			tbe_employment_forms += "<option value=\"" + map.get("tmgd_id")+"\">" + map.get("tmgd_name") + "</option>";
		}
	}
	list = null;
	list = dicMap.get("5");
	if(null != list && list.size() > 0){
		for(Map<String, String> map: list){
			tbe_nation += "<option value=\"" + map.get("tmgd_id")+"\">" + map.get("tmgd_name") + "</option>";
		}
	}
	list = null;
	list = dicMap.get("27");
	if(null != list && list.size() > 0){
		for(Map<String, String> map: list){
			tbe_marital_status += "<option value=\"" + map.get("tmgd_id")+"\">" + map.get("tmgd_name") + "</option>";
		}
	}
	list = null;
	list = dicMap.get("102");
	if(null != list && list.size() > 0){
		for(Map<String, String> map: list){
			tbe_status += "<option value=\"" + map.get("tmgd_id")+"\">" + map.get("tmgd_name") + "</option>";
		}
	}
	list = null;
	list = dicMap.get("103");
	if(null != list && list.size() > 0){
		for(Map<String, String> map: list){
			tbe_ba_status += "<option value=\"" + map.get("tmgd_id")+"\">" + map.get("tmgd_name") + "</option>";
		}
	}
	list = null;
	list = dicMap.get("104");
	if(null != list && list.size() > 0){
		for(Map<String, String> map: list){
			tbe_birth_control_measures += "<option value=\"" + map.get("tmgd_id")+"\">" + map.get("tmgd_name") + "</option>";
		}
	}
	list = null;
	list = dicMap.get("107");
	if(null != list && list.size() > 0){
		for(Map<String, String> map: list){
			tbe_es_reason += "<option value=\"" + map.get("tmgd_id")+"\">" + map.get("tmgd_name") + "</option>";
		}
	}
	
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<base href="<%=basePath%>"/>
		<meta http-equiv="pragma" content="no-cache"/>
		<meta http-equiv="cache-control" content="no-cache"/>
		<meta http-equiv="expires" content="0"/>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

		<link type="text/css" rel="stylesheet" href="ligerUI/skins/Aqua/css/ligerui-all.css" />
		<link type="text/css" rel="stylesheet" href="ligerUI/skins/<%=user.getUserCss()%>/css/ligerui-all.css" />
		<link type="text/css" rel="stylesheet" href="ligerUI/skins/ligerui-icons.css" />
		<link type="text/css" rel="stylesheet" href="resource/css/style.css" />

		<script type="text/javascript" src="js/jquery/jquery-1.7.2.js"></script>
		<script type="text/javascript" src="ligerUI/js/core/base.js"></script>
		<script type="text/javascript" src="ligerUI/js/ligerui.min.js"></script>
		<script type="text/javascript" src="js/common.js"></script>
		<script type="text/javascript" src="js/validata.js"></script>

		<script type="text/javascript" src="ligerUI/js/plugins/ligerGrid.js"></script>
		<script type="text/javascript" src="ligerUI/js/plugins/ligerTree.js"></script>
		<script type="text/javascript" src="ligerUI/js/plugins/ligerForm.js"></script>
		<script type="text/javascript" src="ligerUI/js/plugins/ligerDateEditor.js"></script>
		
		<script type="text/javascript" src="ligerUI/jquery-validation/jquery.validate.min.js" ></script> 
		<script type="text/javascript" src="ligerUI/jquery-validation/jquery.metadata.js"></script>
		<script type="text/javascript" src="ligerUI/jquery-validation/messages_cn.js" ></script>
		
<script type="text/javascript">
var _db = '<%=_db%>';

_jsonObj.classname = "com.wxtf.platform.main.sygl.emptongji_Action";
_jsonObj.methodname = "queryPage";
_jsonObj.logicdata = "[{\"types\":\"init\",\"type\":\"<%=type%>\",\"orgIds\":\"<%=orgId%>\"}]";

$(function(){
	grid1 = $("#emp-grid").ligerGrid({
		url: _url, parms: _jsonObj, width: '100%', height: '100%',
		usePager: true, rownumbers: true, checkbox: false, alternatingRow: true,
		columns: [
			{ display: 'tbe_id', name: 'tbe_id', hide: true,width:1 },
			{ display: 'org_id', name: 'org_id', hide: true,width:1 },
			{ display: '机构名称', name: 'reserve1', width:150, align:'left' },
			{ display: '职工证号', name: 'tbe_work_permit',width: 1, hide:true},
			{ display: '姓名', name: 'tbe_name', width: 100, align: 'left' },
			{ display: '性别', name: 'tbe_sex', width: 60, align: 'left' },
			{ display: '年龄', name: 'tbe_age', width: 1, hide:true },
			{ display: '出生日期', name: 'tbe_birthday', width: 100, align: 'left' },
			{ display: '身份证号', name: 'tbe_idcard', width: 180, align: 'left' },
			{ display: '配偶姓名', name: 'tbfi_spouse_name',width: 100, align: 'left'},
			{ display: '配偶年龄', name: 'tbfi_spouse_age',width: 1, hide:true},
			{ display: '配偶性别', name: 'tbfi_spouse_sex',width: 100, align: 'left'},
			{ display: '配偶出生日期', name: 'tbfi_spouse_birthday',width: 100, align: 'left'},
			{ display: '配偶身份证号', name: 'tbfi_spouse_idcard',width: 100, align: 'left'},
			{ display: '配偶所属单位', name: 'tbfi_spouse_department',width: 100, align: 'left'},
			{ display: '配偶职务', name: 'tbfi_spouse_position', width: 1, hide:true},
			{ display: '籍贯', name: 'tbe_native_palce', width: 1, hide:true },
			{ display: '家庭电话', name: 'tbe_family_phone', width: 100, align: 'left' },
			{ display: '家庭住址', name: 'tbe_address', width: 250, align: 'left' },
			{ display: '家庭人数', name: 'tbfi_peo_num',width: 100, align: 'left' },
			{ display: '家庭子女数', name: 'tbfi_children_num',width: 100, align: 'left'  },
			{ display: '男孩数', name: 'tbfi_children_mnum',width: 100, align: 'left'  },
			{ display: '女孩数', name: 'tbfi_children_fnum',width: 100, align: 'left' },
			{ display: '员工状态', name: 'tbe_status', width: 100, align: 'left',
				render: function(record, index, value, oth){
					<%
					list = dicMap.get("102");
					temp = "";
					if(null != list && list.size() > 0){
						for(Map<String, String> map: list){
					%>
					if(value == '<%=map.get("tmgd_id")%>'){
						<%temp = map.get("tmgd_name");%>
						return '<%=temp%>';
					}
					<%
						}
					}
					%>
					return value;
				}
			},
			{ display: '婚姻状态', name: 'tbe_marital_status', width: 100, align: 'left',
				render: function(record, index, value, oth){
					<%
					list = dicMap.get("27");
					temp = "";
					if(null != list && list.size() > 0){
						for(Map<String, String> map: list){
					%>
					if(value == '<%=map.get("tmgd_id")%>'){
						<%temp = map.get("tmgd_name");%>
						return '<%=temp%>';
					}
					<%
						}
					}
					%>
					return value;
				}
			},
			{ display: '婚姻状况', name: 'tbe_marital_condition', width: 1, hide:true },
			{ display: '是否允许再生育', name: 'tbe_is_again_birth',width: 1, hide:true,
				render: function(record, index, value, oth){ return value == '1' ? '是' : '否'; }
			},
			{ display: '是否不孕症（绝经）', name: 'tbe_is_barrenness', width: 1, hide:true,
				render: function(record, index, value, oth){ return value == '1' ? '是' : '否'; }
			},
			{ display: '是否晚婚', name: 'tbe_is_late_marriage',width: 1, hide:true,
				render: function(record, index, value, oth){ return value == '1' ? '是' : '否'; }
			},
			{ display: '是否晚育', name: 'tbe_is_late_birth', width: 1, hide:true,
				render: function(record, index, value, oth){ return value == '1' ? '是' : '否'; }
			},
			{ display: '配偶员工id', name: 'tbe_spouse_id', width:  1, hide:true },
			{ display: '配偶是否一汽员工', name: 'tbfi_spouse_is_join', width:  1, hide:true },
			{ display: '家庭电话', name: 'tbfi_phone', width:  1, hide:true },
			{ display: '紧急联系电话', name: 'tbfi_mobile', width:  1, hide:true },
			{ display: '家庭地址', name: 'tbfi_address', width:  1, hide:true },
			{ display: '备注', name: 'tbfi_memo', width:  1, hide:true }
		]
	});
	
});

</script>
</head>
<body>
		<center><h2 style="display:block;padding:10px 0;">家庭详细信息</h2></center>
		<div id="emp-grid"></div>
	</body>
</html>










